package com.chen.blog.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.time.LocalDateTime;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 *
 * </p>
 *
 * @author chen
 * @since 2022-01-24
 */
@Data
@TableName("t_blog")
@NoArgsConstructor
@AllArgsConstructor
@ApiModel(value = "Blog对象", description = "")
public class Blog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("作者id")
    @TableField("user_id")
    private Integer userId;

    @ApiModelProperty("分类id")
    @TableField("type_id")
    private Integer typeId;

    @ApiModelProperty("标题")
    @TableField("title")
    private String title;

    @ApiModelProperty("内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("图片")
    @TableField("img")
    private String img;

    @ApiModelProperty("类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("0过审 1没过审")
    @TableField("state")
    private String state;

    @ApiModelProperty("观看次数")
    @TableField("views")
    private Integer views;

    @ApiModelProperty("创建时间")
    @TableField("create_time")
    private LocalDateTime createTime;

    @ApiModelProperty("更新时间")
    @TableField("update_time")
    private LocalDateTime updateTime;

    @ApiModelProperty("标签id")
    @TableField(exist = false)
    private Integer[] tagIds;

}
